using System;
using System.Data;
using System.Collections.Generic;
using Soccer.Core;
using Soccer.Utility;

namespace Soccer.Business
{
    [TableAttribute("MatchInfomations")]
	[Serializable]
    public class MatchInfomation : DBO<MatchInfomation>
    {
		#region Fields
		
		private int? _IdMatchInfomation;
		private int? _IdMatch;
		private string _ClubMatchInfomation;
		private int? _Goals;
		private double? _Procession;
		private int? _Shots;
		private int? _ShotOnTaget;
		private string _ShotOut;
		private int? _GoalkeeperBlock;
		private int? _Conner;
		private int? _Foul;
		private int? _Offside;
		private int? _Yellow;
		private int? _Red;
		
		#endregion
		
		#region Constructors
		/// <summary>
		/// Default constructor
		/// </summary>
		public MatchInfomation()
		{
			
		}
		
		/// <summary>
		/// Constructor with IdMatchInfomation 
		/// </summary>
		/// <param name="IdMatchInfomation">The IdMatchInfomation</param>
		public MatchInfomation(int? IdMatchInfomation )
		{
			this.IdMatchInfomation = IdMatchInfomation;
		}
		
		/// <summary>
		/// Constructor with all parameters
		/// </summary>
		/// <param name="IdMatchInfomation">Sets int? value for IdMatchInfomation</param>
		/// <param name="IdMatch">Sets int? value for IdMatch</param>
		/// <param name="ClubMatchInfomation">Sets string value for ClubMatchInfomation</param>
		/// <param name="Goals">Sets int? value for Goals</param>
		/// <param name="Procession">Sets double? value for Procession</param>
		/// <param name="Shots">Sets int? value for Shots</param>
		/// <param name="ShotOnTaget">Sets int? value for ShotOnTaget</param>
		/// <param name="ShotOut">Sets string value for ShotOut</param>
		/// <param name="GoalkeeperBlock">Sets int? value for GoalkeeperBlock</param>
		/// <param name="Conner">Sets int? value for Conner</param>
		/// <param name="Foul">Sets int? value for Foul</param>
		/// <param name="Offside">Sets int? value for Offside</param>
		/// <param name="Yellow">Sets int? value for Yellow</param>
		/// <param name="Red">Sets int? value for Red</param>
		public MatchInfomation(int? idMatchInfomation, int? idMatch, string clubMatchInfomation, int? goals, double? procession, int? shots, int? shotOnTaget, string shotOut, int? goalkeeperBlock, int? conner, int? foul, int? offside, int? yellow, int? red)
		{
			this.IdMatchInfomation = idMatchInfomation;
			this.IdMatch = idMatch;
			this.ClubMatchInfomation = clubMatchInfomation;
			this.Goals = goals;
			this.Procession = procession;
			this.Shots = shots;
			this.ShotOnTaget = shotOnTaget;
			this.ShotOut = shotOut;
			this.GoalkeeperBlock = goalkeeperBlock;
			this.Conner = conner;
			this.Foul = foul;
			this.Offside = offside;
			this.Yellow = yellow;
			this.Red = red;
		}
		
		#endregion
		
		#region Properties
		
		/// <summary>
		/// Gets or sets int? value for IdMatchInfomation
		/// </summary>
		[ColumnAttribute("IdMatchInfomation", SqlDbType.Int , 4 , true, true, false)]
		public int? IdMatchInfomation
		{
			set
			{
				this._IdMatchInfomation = value;
			}
			get
			{
				return this._IdMatchInfomation;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for IdMatch
		/// </summary>
		[ColumnAttribute("IdMatch", SqlDbType.Int , 4 , false, false, true)]
		public int? IdMatch
		{
			set
			{
				this._IdMatch = value;
			}
			get
			{
				return this._IdMatch;
			}
		}
		
		/// <summary>
		/// Gets or sets string value for ClubMatchInfomation
		/// </summary>
		[ColumnAttribute("ClubMatchInfomation", SqlDbType.NVarChar , 50 , false, false, true)]
		public string ClubMatchInfomation
		{
			set
			{
				this._ClubMatchInfomation = value;
			}
			get
			{
				return this._ClubMatchInfomation;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for Goals
		/// </summary>
		[ColumnAttribute("Goals", SqlDbType.Int , 4 , false, false, true)]
		public int? Goals
		{
			set
			{
				this._Goals = value;
			}
			get
			{
				return this._Goals;
			}
		}
		
		/// <summary>
		/// Gets or sets double? value for Procession
		/// </summary>
		[ColumnAttribute("Procession", SqlDbType.Float , 8 , false, false, true)]
		public double? Procession
		{
			set
			{
				this._Procession = value;
			}
			get
			{
				return this._Procession;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for Shots
		/// </summary>
		[ColumnAttribute("Shots", SqlDbType.Int , 4 , false, false, true)]
		public int? Shots
		{
			set
			{
				this._Shots = value;
			}
			get
			{
				return this._Shots;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for ShotOnTaget
		/// </summary>
		[ColumnAttribute("ShotOnTaget", SqlDbType.Int , 4 , false, false, true)]
		public int? ShotOnTaget
		{
			set
			{
				this._ShotOnTaget = value;
			}
			get
			{
				return this._ShotOnTaget;
			}
		}
		
		/// <summary>
		/// Gets or sets string value for ShotOut
		/// </summary>
		[ColumnAttribute("ShotOut", SqlDbType.NChar , 10 , false, false, true)]
		public string ShotOut
		{
			set
			{
				this._ShotOut = value;
			}
			get
			{
				return this._ShotOut;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for GoalkeeperBlock
		/// </summary>
		[ColumnAttribute("GoalkeeperBlock", SqlDbType.Int , 4 , false, false, true)]
		public int? GoalkeeperBlock
		{
			set
			{
				this._GoalkeeperBlock = value;
			}
			get
			{
				return this._GoalkeeperBlock;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for Conner
		/// </summary>
		[ColumnAttribute("Conner", SqlDbType.Int , 4 , false, false, true)]
		public int? Conner
		{
			set
			{
				this._Conner = value;
			}
			get
			{
				return this._Conner;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for Foul
		/// </summary>
		[ColumnAttribute("Foul", SqlDbType.Int , 4 , false, false, true)]
		public int? Foul
		{
			set
			{
				this._Foul = value;
			}
			get
			{
				return this._Foul;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for Offside
		/// </summary>
		[ColumnAttribute("Offside", SqlDbType.Int , 4 , false, false, true)]
		public int? Offside
		{
			set
			{
				this._Offside = value;
			}
			get
			{
				return this._Offside;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for Yellow
		/// </summary>
		[ColumnAttribute("Yellow", SqlDbType.Int , 4 , false, false, true)]
		public int? Yellow
		{
			set
			{
				this._Yellow = value;
			}
			get
			{
				return this._Yellow;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for Red
		/// </summary>
		[ColumnAttribute("Red", SqlDbType.Int , 4 , false, false, true)]
		public int? Red
		{
			set
			{
				this._Red = value;
			}
			get
			{
				return this._Red;
			}
		}
		
		
		/// <summary>
		/// Get a Match of current MatchInfomation object base on IdMatch
		/// </summary>
		public Match Match
		{
			get
			{
				if (this.IdMatch == null)
					return null;
	
				Match condition = new Match(this.IdMatch);
				return MatchController.FindItem(condition);
			}
		}
		
		#endregion
        
        #region Other Properties
        private static ColumnNameStruct? _ColumnName;
        public static ColumnNameStruct ColumnName
        {
            get
            {
                if (!_ColumnName.HasValue)
                    _ColumnName = new ColumnNameStruct();
                return _ColumnName.Value;
            }
        }
        #endregion

        #region NestedType
        public  struct ColumnNameStruct
        {
            /// <summary>
            /// Get the name of column [IdMatchInfomation]
            /// </summary>
            public string IdMatchInfomation
            {
                get
                {
                    return "IdMatchInfomation";
                }
            }
            /// <summary>
            /// Get the name of column [IdMatch]
            /// </summary>
            public string IdMatch
            {
                get
                {
                    return "IdMatch";
                }
            }
            /// <summary>
            /// Get the name of column [ClubMatchInfomation]
            /// </summary>
            public string ClubMatchInfomation
            {
                get
                {
                    return "ClubMatchInfomation";
                }
            }
            /// <summary>
            /// Get the name of column [Goals]
            /// </summary>
            public string Goals
            {
                get
                {
                    return "Goals";
                }
            }
            /// <summary>
            /// Get the name of column [Procession]
            /// </summary>
            public string Procession
            {
                get
                {
                    return "Procession";
                }
            }
            /// <summary>
            /// Get the name of column [Shots]
            /// </summary>
            public string Shots
            {
                get
                {
                    return "Shots";
                }
            }
            /// <summary>
            /// Get the name of column [ShotOnTaget]
            /// </summary>
            public string ShotOnTaget
            {
                get
                {
                    return "ShotOnTaget";
                }
            }
            /// <summary>
            /// Get the name of column [ShotOut]
            /// </summary>
            public string ShotOut
            {
                get
                {
                    return "ShotOut";
                }
            }
            /// <summary>
            /// Get the name of column [GoalkeeperBlock]
            /// </summary>
            public string GoalkeeperBlock
            {
                get
                {
                    return "GoalkeeperBlock";
                }
            }
            /// <summary>
            /// Get the name of column [Conner]
            /// </summary>
            public string Conner
            {
                get
                {
                    return "Conner";
                }
            }
            /// <summary>
            /// Get the name of column [Foul]
            /// </summary>
            public string Foul
            {
                get
                {
                    return "Foul";
                }
            }
            /// <summary>
            /// Get the name of column [Offside]
            /// </summary>
            public string Offside
            {
                get
                {
                    return "Offside";
                }
            }
            /// <summary>
            /// Get the name of column [Yellow]
            /// </summary>
            public string Yellow
            {
                get
                {
                    return "Yellow";
                }
            }
            /// <summary>
            /// Get the name of column [Red]
            /// </summary>
            public string Red
            {
                get
                {
                    return "Red";
                }
            }
        }
        #endregion
    }
}
